namespace Idp_Login.Configs.Id4
{

    public class Id4
    {
        /// <summary>
        /// 连接字符串信息
        /// </summary>
        public Connectionstrings1 ConnectionStrings { get; set; }
        /// <summary>
        /// id4地址/nginx 反向代理
        /// </summary>
        public string Authority { get; set; }
        /// <summary>
        /// 数据保护
        /// </summary>
        public Dataprotection DataProtection { get; set; }
        /// <summary>
        /// 证书
        /// </summary>
        public Certificate Certificate { get; set; }
        /// <summary>
        /// redis 缓存
        /// </summary>
        public RedisCache RedisCache { get; set; }
        public DistributedSessionRedis DistributedSessionRedis { get; set; }
    }
    /// <summary>
    /// redis分布式Session
    /// </summary>
    public class DistributedSessionRedis
    {
        public string RedisConnectionString { get; set; }
    }
    public class Connectionstrings1
    {
        /// <summary>
        /// client和Resource 的数据库连接地址
        /// </summary>
        public string Idp { get; set; }
        /// <summary>
        /// User 的数据库连接地址
        /// </summary>
        public string IdpUser { get; set; }
    }

    public class Dataprotection
    {
        /// <summary>
        /// 默认为当前程序集
        /// 默认情况下，即使使用相同的物理密钥库，Data Protection 也会把不同的应用程序隔离开，因为这样可以防止从一个应用程序获取另外一个应用程序的密钥。所以如果是相同的应用程序，可以设置相同的应用程序名称
        /// </summary>
        public string ApplicationName { get; set; }
        /// <summary>
        /// 保存的Redis配置地址
        /// </summary>
        public SaveToRedis SaveToRedis { get; set; }
    }

    /// <summary>
    /// 保存的Redis配置地址
    /// </summary>
    public class SaveToRedis
    {
        /// <summary>
        /// redis 连接字符串
        /// </summary>
        public string RedisConnectionString { get; set; }
        /// <summary>
        /// 默认0
        /// </summary>
        public int Db { get; set; } = 0;
        /// <summary>
        /// 默认是当前程序集名字
        /// 网上Demo 是 DataProtection-Keys
        /// </summary>
        public string PersistKeys { get; set; }
    }

    public class Certificate
    {
        /// <summary>
        /// 证书相对路径
        /// </summary>
        public string Path { get; set; }
        /// <summary>
        /// 证书密码
        /// </summary>
        public string Password { get; set; }
    }

    public class RedisCache
    {
        public Operationalstoreoption OperationalStoreOption { get; set; }
        public Rediscachingoption RedisCachingOption { get; set; }
    }

    public class Operationalstoreoption
    {
        public string RedisConnectionString { get; set; }
        public int Db { get; set; }
    }

    public class Rediscachingoption
    {
        public string RedisConnectionString { get; set; }
        public string KeyPrefix { get; set; }
    }

}
